3.9.5 \(\int (a+i a \tan (e+f x))^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx\) [805]

3.9.5.1 Optimal result
3.9.5.2 Mathematica [A] (verified)
3.9.5.3 Rubi [A] (verified)
3.9.5.4 Maple [B] (verified)
3.9.5.5 Fricas [B] (verification not implemented)
3.9.5.6 Sympy [F(-1)]
3.9.5.7 Maxima [B] (verification not implemented)
3.9.5.8 Giac [F(-1)]
3.9.5.9 Mupad [F(-1)]

3.9.5.1 Optimal result

Integrand size = 45, antiderivative size = 288 \[ \int (a+i a \tan (e+f x))^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=-\frac {a^{5/2} (6 i A-B) c^{7/2} \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{8 f}+\frac {a^2 (6 A+i B) c^3 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {a (6 A+i B) c^2 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}-\frac {(6 i A-B) c (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{30 f}+\frac {B (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2}}{6 f} \]

output
-1/8*a^(5/2)*(6*I*A-B)*c^(7/2)*arctan(c^(1/2)*(a+I*a*tan(f*x+e))^(1/2)/a^( 
1/2)/(c-I*c*tan(f*x+e))^(1/2))/f+1/16*a^2*(6*A+I*B)*c^3*(a+I*a*tan(f*x+e)) 
^(1/2)*(c-I*c*tan(f*x+e))^(1/2)*tan(f*x+e)/f+1/24*a*(6*A+I*B)*c^2*tan(f*x+ 
e)*(a+I*a*tan(f*x+e))^(3/2)*(c-I*c*tan(f*x+e))^(3/2)/f-1/30*(6*I*A-B)*c*(a 
+I*a*tan(f*x+e))^(5/2)*(c-I*c*tan(f*x+e))^(5/2)/f+1/6*B*(a+I*a*tan(f*x+e)) 
^(5/2)*(c-I*c*tan(f*x+e))^(7/2)/f
 
3.9.5.2 Mathematica [A] (verified)

Time = 11.11 (sec) , antiderivative size = 231, normalized size of antiderivative = 0.80 \[ \int (a+i a \tan (e+f x))^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\frac {a^{5/2} c^4 \sqrt {1-i \tan (e+f x)} \left (30 (-6 i A+B) \arcsin \left (\frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) \sqrt {a+i a \tan (e+f x)}+\frac {1}{8} \sqrt {a} \sec ^4(e+f x) \sqrt {1-i \tan (e+f x)} (1+i \tan (e+f x)) (384 (-i A+B)+5 (102 A-47 i B+20 (6 A+i B) \cos (2 (e+f x))+3 (6 A+i B) \cos (4 (e+f x))) \tan (e+f x))\right )}{240 f \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}} \]

input
Integrate[(a + I*a*Tan[e + f*x])^(5/2)*(A + B*Tan[e + f*x])*(c - I*c*Tan[e 
 + f*x])^(7/2),x]
 
output
(a^(5/2)*c^4*Sqrt[1 - I*Tan[e + f*x]]*(30*((-6*I)*A + B)*ArcSin[Sqrt[a + I 
*a*Tan[e + f*x]]/(Sqrt[2]*Sqrt[a])]*Sqrt[a + I*a*Tan[e + f*x]] + (Sqrt[a]* 
Sec[e + f*x]^4*Sqrt[1 - I*Tan[e + f*x]]*(1 + I*Tan[e + f*x])*(384*((-I)*A 
+ B) + 5*(102*A - (47*I)*B + 20*(6*A + I*B)*Cos[2*(e + f*x)] + 3*(6*A + I* 
B)*Cos[4*(e + f*x)])*Tan[e + f*x]))/8))/(240*f*Sqrt[a + I*a*Tan[e + f*x]]* 
Sqrt[c - I*c*Tan[e + f*x]])
 
3.9.5.3 Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 267, normalized size of antiderivative = 0.93, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {3042, 4071, 90, 59, 40, 40, 45, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2} (A+B \tan (e+f x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2} (A+B \tan (e+f x))dx\)

\(\Big \downarrow \) 4071

\(\displaystyle \frac {a c \int (i \tan (e+f x) a+a)^{3/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{5/2}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 90

\(\displaystyle \frac {a c \left (\frac {1}{6} (6 A+i B) \int (i \tan (e+f x) a+a)^{3/2} (c-i c \tan (e+f x))^{5/2}d\tan (e+f x)+\frac {B (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2}}{6 a c}\right )}{f}\)

\(\Big \downarrow \) 59

\(\displaystyle \frac {a c \left (\frac {1}{6} (6 A+i B) \left (c \int (i \tan (e+f x) a+a)^{3/2} (c-i c \tan (e+f x))^{3/2}d\tan (e+f x)-\frac {i (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{5 a}\right )+\frac {B (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2}}{6 a c}\right )}{f}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a c \left (\frac {1}{6} (6 A+i B) \left (c \left (\frac {3}{4} a c \int \sqrt {i \tan (e+f x) a+a} \sqrt {c-i c \tan (e+f x)}d\tan (e+f x)+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )-\frac {i (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{5 a}\right )+\frac {B (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2}}{6 a c}\right )}{f}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a c \left (\frac {1}{6} (6 A+i B) \left (c \left (\frac {3}{4} a c \left (\frac {1}{2} a c \int \frac {1}{\sqrt {i \tan (e+f x) a+a} \sqrt {c-i c \tan (e+f x)}}d\tan (e+f x)+\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )-\frac {i (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{5 a}\right )+\frac {B (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2}}{6 a c}\right )}{f}\)

\(\Big \downarrow \) 45

\(\displaystyle \frac {a c \left (\frac {1}{6} (6 A+i B) \left (c \left (\frac {3}{4} a c \left (a c \int \frac {1}{i a+\frac {i c (i \tan (e+f x) a+a)}{c-i c \tan (e+f x)}}d\frac {\sqrt {i \tan (e+f x) a+a}}{\sqrt {c-i c \tan (e+f x)}}+\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )-\frac {i (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{5 a}\right )+\frac {B (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2}}{6 a c}\right )}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {a c \left (\frac {1}{6} (6 A+i B) \left (c \left (\frac {3}{4} a c \left (\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}-i \sqrt {a} \sqrt {c} \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )-\frac {i (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{5 a}\right )+\frac {B (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{7/2}}{6 a c}\right )}{f}\)

input
Int[(a + I*a*Tan[e + f*x])^(5/2)*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x 
])^(7/2),x]
 
output
(a*c*((B*(a + I*a*Tan[e + f*x])^(5/2)*(c - I*c*Tan[e + f*x])^(7/2))/(6*a*c 
) + ((6*A + I*B)*(((-1/5*I)*(a + I*a*Tan[e + f*x])^(5/2)*(c - I*c*Tan[e + 
f*x])^(5/2))/a + c*((Tan[e + f*x]*(a + I*a*Tan[e + f*x])^(3/2)*(c - I*c*Ta 
n[e + f*x])^(3/2))/4 + (3*a*c*((-I)*Sqrt[a]*Sqrt[c]*ArcTan[(Sqrt[c]*Sqrt[a 
 + I*a*Tan[e + f*x]])/(Sqrt[a]*Sqrt[c - I*c*Tan[e + f*x]])] + (Tan[e + f*x 
]*Sqrt[a + I*a*Tan[e + f*x]]*Sqrt[c - I*c*Tan[e + f*x]])/2))/4)))/6))/f
 

3.9.5.3.1 Defintions of rubi rules used

rule 40
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[x* 
(a + b*x)^m*((c + d*x)^m/(2*m + 1)), x] + Simp[2*a*c*(m/(2*m + 1))   Int[(a 
 + b*x)^(m - 1)*(c + d*x)^(m - 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[ 
b*c + a*d, 0] && IGtQ[m + 1/2, 0]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 59
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a 
 + b*x)^(m + 1)*((c + d*x)^n/(b*(m + n + 1))), x] + Simp[2*c*(n/(m + n + 1) 
)   Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && 
EqQ[b*c + a*d, 0] && IGtQ[m + 1/2, 0] && IGtQ[n + 1/2, 0] && LtQ[m, n]
 

rule 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4071
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + 
 (f_.)*(x_)])*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si 
mp[a*(c/f)   Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x], x 
, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c 
+ a*d, 0] && EqQ[a^2 + b^2, 0]
 
3.9.5.4 Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 477 vs. \(2 (236 ) = 472\).

Time = 0.48 (sec) , antiderivative size = 478, normalized size of antiderivative = 1.66

method result size
derivativedivides \(-\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{2} c^{3} \left (40 i B \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{5}+48 i A \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{4}+70 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}-48 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{4}+96 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}-60 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}-15 i B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c +15 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )-96 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}+48 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}-90 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c -150 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )-48 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{240 f \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}\) \(478\)
default \(-\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{2} c^{3} \left (40 i B \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{5}+48 i A \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )^{4}+70 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}-48 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{4}+96 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}-60 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}-15 i B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c +15 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )-96 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}+48 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}-90 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c -150 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )-48 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{240 f \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}\) \(478\)
parts \(-\frac {A \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{2} c^{3} \left (8 i \tan \left (f x +e \right )^{4} \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}+16 i \tan \left (f x +e \right )^{2} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}-10 \tan \left (f x +e \right )^{3} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+8 i \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}-15 a c \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right )-25 \tan \left (f x +e \right ) \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\right )}{40 f \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}}+\frac {B \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{2} c^{3} \left (-40 i \tan \left (f x +e \right )^{5} \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}-70 i \tan \left (f x +e \right )^{3} \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}+48 \tan \left (f x +e \right )^{4} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+15 i \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c -15 i \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )+96 \tan \left (f x +e \right )^{2} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+48 \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{240 f \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}}\) \(531\)

input
int((a+I*a*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/2),x,m 
ethod=_RETURNVERBOSE)
 
output
-1/240/f*(a*(1+I*tan(f*x+e)))^(1/2)*(-c*(I*tan(f*x+e)-1))^(1/2)*a^2*c^3*(4 
0*I*B*(a*c*(1+tan(f*x+e)^2))^(1/2)*(a*c)^(1/2)*tan(f*x+e)^5+48*I*A*(a*c*(1 
+tan(f*x+e)^2))^(1/2)*(a*c)^(1/2)*tan(f*x+e)^4+70*I*B*(a*c)^(1/2)*(a*c*(1+ 
tan(f*x+e)^2))^(1/2)*tan(f*x+e)^3-48*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^ 
(1/2)*tan(f*x+e)^4+96*I*A*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x 
+e)^2-60*A*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)^3-15*I*B*ln 
((a*c*tan(f*x+e)+(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2))/(a*c)^(1/2))*a* 
c+15*I*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)-96*B*(a*c)^(1 
/2)*(a*c*(1+tan(f*x+e)^2))^(1/2)*tan(f*x+e)^2+48*I*A*(a*c)^(1/2)*(a*c*(1+t 
an(f*x+e)^2))^(1/2)-90*A*ln((a*c*tan(f*x+e)+(a*c)^(1/2)*(a*c*(1+tan(f*x+e) 
^2))^(1/2))/(a*c)^(1/2))*a*c-150*A*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2 
)*tan(f*x+e)-48*B*(a*c)^(1/2)*(a*c*(1+tan(f*x+e)^2))^(1/2))/(a*c)^(1/2)/(a 
*c*(1+tan(f*x+e)^2))^(1/2)
 
3.9.5.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 756 vs. \(2 (220) = 440\).

Time = 0.28 (sec) , antiderivative size = 756, normalized size of antiderivative = 2.62 \[ \int (a+i a \tan (e+f x))^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\frac {15 \, \sqrt {\frac {{\left (36 \, A^{2} + 12 i \, A B - B^{2}\right )} a^{5} c^{7}}{f^{2}}} {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (-\frac {4 \, {\left (2 \, {\left ({\left (6 i \, A - B\right )} a^{2} c^{3} e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (6 i \, A - B\right )} a^{2} c^{3} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} + \sqrt {\frac {{\left (36 \, A^{2} + 12 i \, A B - B^{2}\right )} a^{5} c^{7}}{f^{2}}} {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} - f\right )}\right )}}{{\left (-6 i \, A + B\right )} a^{2} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-6 i \, A + B\right )} a^{2} c^{3}}\right ) - 15 \, \sqrt {\frac {{\left (36 \, A^{2} + 12 i \, A B - B^{2}\right )} a^{5} c^{7}}{f^{2}}} {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (-\frac {4 \, {\left (2 \, {\left ({\left (6 i \, A - B\right )} a^{2} c^{3} e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (6 i \, A - B\right )} a^{2} c^{3} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} - \sqrt {\frac {{\left (36 \, A^{2} + 12 i \, A B - B^{2}\right )} a^{5} c^{7}}{f^{2}}} {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} - f\right )}\right )}}{{\left (-6 i \, A + B\right )} a^{2} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-6 i \, A + B\right )} a^{2} c^{3}}\right ) - 4 \, {\left (15 \, {\left (6 i \, A - B\right )} a^{2} c^{3} e^{\left (11 i \, f x + 11 i \, e\right )} + 85 \, {\left (6 i \, A - B\right )} a^{2} c^{3} e^{\left (9 i \, f x + 9 i \, e\right )} + 198 \, {\left (6 i \, A - B\right )} a^{2} c^{3} e^{\left (7 i \, f x + 7 i \, e\right )} + 6 \, {\left (58 i \, A - 223 \, B\right )} a^{2} c^{3} e^{\left (5 i \, f x + 5 i \, e\right )} + 85 \, {\left (-6 i \, A + B\right )} a^{2} c^{3} e^{\left (3 i \, f x + 3 i \, e\right )} + 15 \, {\left (-6 i \, A + B\right )} a^{2} c^{3} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{480 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

input
integrate((a+I*a*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="fricas")
 
output
1/480*(15*sqrt((36*A^2 + 12*I*A*B - B^2)*a^5*c^7/f^2)*(f*e^(10*I*f*x + 10* 
I*e) + 5*f*e^(8*I*f*x + 8*I*e) + 10*f*e^(6*I*f*x + 6*I*e) + 10*f*e^(4*I*f* 
x + 4*I*e) + 5*f*e^(2*I*f*x + 2*I*e) + f)*log(-4*(2*((6*I*A - B)*a^2*c^3*e 
^(3*I*f*x + 3*I*e) + (6*I*A - B)*a^2*c^3*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f 
*x + 2*I*e) + 1))*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1)) + sqrt((36*A^2 + 12*I* 
A*B - B^2)*a^5*c^7/f^2)*(f*e^(2*I*f*x + 2*I*e) - f))/((-6*I*A + B)*a^2*c^3 
*e^(2*I*f*x + 2*I*e) + (-6*I*A + B)*a^2*c^3)) - 15*sqrt((36*A^2 + 12*I*A*B 
 - B^2)*a^5*c^7/f^2)*(f*e^(10*I*f*x + 10*I*e) + 5*f*e^(8*I*f*x + 8*I*e) + 
10*f*e^(6*I*f*x + 6*I*e) + 10*f*e^(4*I*f*x + 4*I*e) + 5*f*e^(2*I*f*x + 2*I 
*e) + f)*log(-4*(2*((6*I*A - B)*a^2*c^3*e^(3*I*f*x + 3*I*e) + (6*I*A - B)* 
a^2*c^3*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/(e^(2*I* 
f*x + 2*I*e) + 1)) - sqrt((36*A^2 + 12*I*A*B - B^2)*a^5*c^7/f^2)*(f*e^(2*I 
*f*x + 2*I*e) - f))/((-6*I*A + B)*a^2*c^3*e^(2*I*f*x + 2*I*e) + (-6*I*A + 
B)*a^2*c^3)) - 4*(15*(6*I*A - B)*a^2*c^3*e^(11*I*f*x + 11*I*e) + 85*(6*I*A 
 - B)*a^2*c^3*e^(9*I*f*x + 9*I*e) + 198*(6*I*A - B)*a^2*c^3*e^(7*I*f*x + 7 
*I*e) + 6*(58*I*A - 223*B)*a^2*c^3*e^(5*I*f*x + 5*I*e) + 85*(-6*I*A + B)*a 
^2*c^3*e^(3*I*f*x + 3*I*e) + 15*(-6*I*A + B)*a^2*c^3*e^(I*f*x + I*e))*sqrt 
(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1)))/(f*e^(10* 
I*f*x + 10*I*e) + 5*f*e^(8*I*f*x + 8*I*e) + 10*f*e^(6*I*f*x + 6*I*e) + 10* 
f*e^(4*I*f*x + 4*I*e) + 5*f*e^(2*I*f*x + 2*I*e) + f)
 
3.9.5.6 Sympy [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\text {Timed out} \]

input
integrate((a+I*a*tan(f*x+e))**(5/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**( 
7/2),x)
 
output
Timed out
 
3.9.5.7 Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2033 vs. \(2 (220) = 440\).

Time = 4.58 (sec) , antiderivative size = 2033, normalized size of antiderivative = 7.06 \[ \int (a+i a \tan (e+f x))^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\text {Too large to display} \]

input
integrate((a+I*a*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="maxima")
 
output
-3840*(60*(6*A + I*B)*a^2*c^3*cos(11/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x 
 + 2*e))) + 340*(6*A + I*B)*a^2*c^3*cos(9/2*arctan2(sin(2*f*x + 2*e), cos( 
2*f*x + 2*e))) + 792*(6*A + I*B)*a^2*c^3*cos(7/2*arctan2(sin(2*f*x + 2*e), 
 cos(2*f*x + 2*e))) + 24*(58*A + 223*I*B)*a^2*c^3*cos(5/2*arctan2(sin(2*f* 
x + 2*e), cos(2*f*x + 2*e))) - 340*(6*A + I*B)*a^2*c^3*cos(3/2*arctan2(sin 
(2*f*x + 2*e), cos(2*f*x + 2*e))) - 60*(6*A + I*B)*a^2*c^3*cos(1/2*arctan2 
(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 60*(6*I*A - B)*a^2*c^3*sin(11/2*ar 
ctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 340*(6*I*A - B)*a^2*c^3*sin(9 
/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 792*(6*I*A - B)*a^2*c^3* 
sin(7/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 24*(58*I*A - 223*B) 
*a^2*c^3*sin(5/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 340*(-6*I* 
A + B)*a^2*c^3*sin(3/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 60*( 
-6*I*A + B)*a^2*c^3*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 
 30*((6*A + I*B)*a^2*c^3*cos(12*f*x + 12*e) + 6*(6*A + I*B)*a^2*c^3*cos(10 
*f*x + 10*e) + 15*(6*A + I*B)*a^2*c^3*cos(8*f*x + 8*e) + 20*(6*A + I*B)*a^ 
2*c^3*cos(6*f*x + 6*e) + 15*(6*A + I*B)*a^2*c^3*cos(4*f*x + 4*e) + 6*(6*A 
+ I*B)*a^2*c^3*cos(2*f*x + 2*e) + (6*I*A - B)*a^2*c^3*sin(12*f*x + 12*e) + 
 6*(6*I*A - B)*a^2*c^3*sin(10*f*x + 10*e) + 15*(6*I*A - B)*a^2*c^3*sin(8*f 
*x + 8*e) + 20*(6*I*A - B)*a^2*c^3*sin(6*f*x + 6*e) + 15*(6*I*A - B)*a^2*c 
^3*sin(4*f*x + 4*e) + 6*(6*I*A - B)*a^2*c^3*sin(2*f*x + 2*e) + (6*A + I...
 
3.9.5.8 Giac [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\text {Timed out} \]

input
integrate((a+I*a*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="giac")
 
output
Timed out
 
3.9.5.9 Mupad [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\int \left (A+B\,\mathrm {tan}\left (e+f\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{5/2}\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2} \,d x \]

input
int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^(5/2)*(c - c*tan(e + f*x) 
*1i)^(7/2),x)
 
output
int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^(5/2)*(c - c*tan(e + f*x) 
*1i)^(7/2), x)